core/chains/evm/log: prioritize replay requests#6047
Conversation
|
I see that you haven't updated any CHANGELOG files. Would it make sense to do so? |
| // manually by someone who knows what he is doing | ||
| b.backfillBlockNumber.SetValid(blockNumber) | ||
| b.logger.Debugw("Returning from the event loop to replay logs from specific block number", "blockNumber", blockNumber) | ||
| b.onReplayRequest(blockNumber) |
There was a problem hiding this comment.
If we have it above, do we still need it here?
There was a problem hiding this comment.
Yes, because we only check above, but then sit and wait here. We still need to yield to replay also.
| } | ||
|
|
||
| select { | ||
| case rawLog := <-chRawLogs: |
There was a problem hiding this comment.
What happens if we get something on the replayChannel, but there is already a message waiting on the chRawLogs channel (from before the replay). Would that cause issues once the replay starts?
There was a problem hiding this comment.
IIUC the replay should only be delayed by one log in the worst case (or one other action here in general, e.g. head), then it would loop again and necessarily select the replay in the priority select.
5a33dc0 to
2719049
Compare
Story details: https://app.shortcut.com/chainlinklabs/story/28587